# Maintainer: Jelle van der Waa <jelle@archlinux.org>
# Contributor: Maxim Andersson <thesilentboatman@gmail.com>

pkgname=python-zeroconf
pkgver=0.39.4
pkgrel=2
pkgdesc="A pure python implementation of multicast DNS service discovery"
arch=('any')
url="https://github.com/jstasiak/python-zeroconf"
license=('LGPL')
depends=('python' 'python-netifaces' 'python-six' 'python-ifaddr' 'python-async-timeout')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=($pkgname-$pkgver.tar.gz::https://github.com/jstasiak/${pkgname}/archive/${pkgver}.tar.gz)
sha256sums=('32783c9a583419abe7223ba199e2ddebe9533011caecf6a268852e0fbea1186a')

build() {
  cd "${pkgbase}-${pkgver}"
  python3 setup.py build
}

package() {
  cd "${pkgbase}-${pkgver}"

  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
}

check() {
  cd "${pkgbase}-${pkgver}"
  pytest -k 'not test_integration_with_listener_ipv6' tests
}

# vim:set ts=2 sw=2 et:
